﻿<navigation:Page x:Class="Corina.Lantern.Hub.Views.Datas.StatisticView"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:Views="clr-namespace:Microsoft.Internal.Pivot.Views;assembly=System.Windows.Controls.Pivot"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:localViewmodel="clr-namespace:Corina.Lantern.Hub.Viewmodels"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
                 xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
                 d:DesignHeight="480"
                 d:DesignWidth="640"
                 mc:Ignorable="d">
    <navigation:Page.DataContext>
        <localViewmodel:StatisticViewmodel />
    </navigation:Page.DataContext>
    <Grid x:Name="LayoutRoot">

        <sdk:TabControl>
            <sdk:TabItem Header="趋势图">
                <Grid Background="#FFE5E5E5">

                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Grid Margin="0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" MinWidth="120" />
                            <ColumnDefinition Width="Auto" MinWidth="180" />
                            <ColumnDefinition Width="Auto" MinWidth="180" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <ComboBox ItemsSource="{Binding MeasureObjectCollection}" SelectedItem="{Binding SelectedMeasure, Mode=TwoWay}" />
                        <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="12,0">
                            <sdk:DatePicker MinWidth="150"/>
                            <TextBlock Text=" - " VerticalAlignment="Center"/>
                            <sdk:DatePicker MinWidth="150" />
                        </StackPanel>
                    </Grid>

                    <toolkit:Chart Grid.Row="1">
                        <toolkit:Chart.Series>
                            <toolkit:LineSeries Title="{Binding SelectedMeasure}"
                                                DependentValuePath="Value"
                                                IndependentValuePath="Key"
                                                ItemsSource="{Binding LinesKVP,
                                                                      Mode=OneWay}" />
                        </toolkit:Chart.Series>
                    </toolkit:Chart>


                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="">
                <Grid Background="#FFE5E5E5" />
            </sdk:TabItem>
            <sdk:TabItem>
                <Grid />
            </sdk:TabItem>
        </sdk:TabControl>

    </Grid>
</navigation:Page>
